using System;

namespace SpringSeries.Core.EventWiring
{
	public delegate void SimpleEvent(object sender, CustomEventArgs args);

	public class EventPublisher
	{
		private string _publisherName;

		public event SimpleEvent _simpleEvent;

		public EventPublisher()
		{
		}

		public string PublisherName
		{
			get { return _publisherName; }
			set { _publisherName = value; }
		}

		public void RaiseSimpleEvent()
		{
			if (_simpleEvent != null)
                _simpleEvent(this, new CustomEventArgs("SimpleEvent raised from " + _publisherName));
		}
	}
}